#include<bits/stdc++.h>
using namespace std;
int main()
{
	cin.tie(0);
	cout.tie(0);
	ios::sync_with_stdio(0);
	int n;cin>>n;
	while(n--){
	string s;
	cin>>s;
	int q=s[0]-'0'+s[1]-'0'+s[2]-'0';
	int p=s[3]-'0'+s[4]-'0'+s[5]-'0';
	if(q==p){
		cout<<"You are lucky!"<<endl;
	}
	if(q!=p){
		cout<<"Wish you good luck."<<endl;
	}
}
	return 0;
}